<template>
  <span class="email">
    <a :href="mailTo">{{value.email}}</a>
  </span>
</template>
<script>
  export default {
    name: 'HAddressDisplay',
    props: {
      value: {
        type: Object
      }
    },
    methods: {
      mailTo: function () {
        if (value != null && value.email != null) {
          return 'mailto:' + value.email
        } else {
          return '#'
        }
      }
    }
  }
</script>
